#ifndef SOPHOMORE_WIDGET_H
#define SOPHOMORE_WIDGET_H

#include <QWidget>
#include "math.h"
class QCheckBox;
class QPushButton;
class QVBoxLayout;
class QHBoxLayout;
class QSpinBox;
class QLabel;
class QLineEdit;
 typedef const QString (Math::*ClassFunction)();
class SophomoreWidget : public QWidget
{
    Q_OBJECT
public:
    explicit SophomoreWidget(QWidget *parent = nullptr);

signals:


public slots:
    void slotClickBtn();
private:
    void initUI();
    void initConnect();
    void saveFile(QString fileName);
    Math *m;
    std::vector<ClassFunction> functionPointers;
    QCheckBox *m_checkboxFun1;
    QCheckBox *m_checkboxFun2;
    QCheckBox *m_checkboxFun3;
    QCheckBox *m_checkboxFun4;
    QHBoxLayout *m_layoutNum;
    QVBoxLayout *m_layoutMain;

    QPushButton *m_btn;
    // 选择保存文件路径的按钮
    QPushButton *m_btnSavevFile;
    // 显示文件路径
    QLineEdit* m_edtSaveFileName;

    QLabel* m_labNum;
    QSpinBox* m_SpinBoxNum;
};

#endif // SOPHOMORE_WIDGET_H
